﻿ #region Disclaimer/Info
 
 /////////////////////////////////////////////////////////////////////////////////////////////////
 //
 //   File:		CacheRules.cs
 //   Website:		http://dexterblogengine.com/
 //   Authors:		http://dexterblogengine.com/About.ashx
 //   Rev:		1
 //   Created:		19/01/2011
 //   Last edit:		19/01/2011
 //   License:		GNU Library General Public License (LGPL)
 //   File:            CacheRules.cs
 //   For updated news and information please visit http://dexterblogengine.com/
 //   Dexter is hosted to Codeplex at http://dexterblogengine.codeplex.com
 //   For any question contact info@dexterblogengine.com
 //
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 #endregion


namespace Dexter.Repository.NHibernate.Queries {
	
	/// <summary>
	/// This class contains a set of information about queries caching
	/// </summary>
	public static class CacheRules {
		
		/// <summary>
		/// Return the default timeout of the queries in seconds.
		/// </summary>
		/// <value>The default time out (default 3600 seconds).</value>
		public static int DefaultTimeOut {
			get { return 3600; }
		}

		#region Nested type: Regions

		/// <summary>
		/// This class contains all cache regions names used into the repository.
		/// </summary>
		public static class Regions {
			/// <summary>
			///Return the region name used for all queries on <see cref="Dexter.Core.Domain.Model.Post"/> cache.
			/// </summary>
			/// <value>The cache region name.</value>
			public static string Post {
				get { return "PostQuery"; }
			}

			/// <summary>
			///Return the region name used for all queries on <see cref="Dexter.Core.Domain.Model.Page"/> cache.
			/// </summary>
			/// <value>The cache region name.</value>
			public static string Page {
				get { return "PageQuery"; }
			}

			/// <summary>
			///Return the region name used for all queries on <see cref="Dexter.Core.Domain.Model.User"/> cache.
			/// </summary>
			/// <value>The cache region name.</value>
			public static string User {
				get { return "UserQuery"; }
			}

			/// <summary>
			///Return the region name used for all queries on <see cref="EmailMessage"/> cache.
			/// </summary>
			/// <value>The cache region name.</value>
			public static string Email {
				get { return "EmailQuery"; }
			}

			/// <summary>
			///Return the region name used for all queries on <see cref="Dexter.Core.Domain.Model.Comment"/> cache.
			/// </summary>
			/// <value>The cache region name.</value>
			public static string Comment {
				get { return "CommentQuery"; }
			}

			/// <summary>
			///Return the region name used for all queries on <see cref="Dexter.Core.Domain.Model.Category"/> cache.
			/// </summary>
			/// <value>The cache region name.</value>
			public static string Category {
				get { return "CategoryQuery"; }
			}

			/// <summary>
			///Return the region name used for all queries on <see cref="TagItem"/> cache.
			/// </summary>
			/// <value>The cache region name.</value>
			public static string Tag {
				get { return "TagQuery"; }
			}

			/// <summary>
			///Return the region name used for all queries on <see cref="Dexter.Core.Domain.Model.Configuration"/> cache.
			/// </summary>
			/// <value>The cache region name.</value>
			public static string Configuration {
				get { return "ConfigurationQuery"; }
			}

			/// <summary>
			///Return the region name used for all queries that not requires invalidation.
			/// </summary>
			/// <value>The cache region name.</value>
			public static string Tolerant {
				get { return "TollerantQuery"; }
			}
		}

		#endregion
	}
}
